package com.lp.dao;

import com.lp.po.User;
import com.lp.po.UserExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {
   //登陆匹配
   User findUser(User user);
   //用户名匹配
   User findName(String username);
   //添加管理员
   int insert(User user);

   List<User> selectAll();

   List<User> selectByExample(UserExample example);
   //根据用户名更新名和密码
   void updateById(@Param("username") String username, @Param("password")String password,@Param("role") Integer role, @Param("userid")Integer userid);
   //根据用户名查找用户id
   User findUserIdWithUserName(String username);

   //更新admin密码
   void updateWhitPassword(@Param("password")String password);
   //更新用户密码
   void updateWhitStudent(@Param("password")String password,@Param("username")String username);

   //根据用户名查找用户是否粗在
   User findUserByName(String username);

   int findUseridByStudentName(String usernam);
   void updateByUserId(@Param("username")String username,@Param("userid")Integer userid);

}